<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="page-view-size" content="1280*720">
  <link rel="stylesheet" href="styles/base.css">
  <title>国宝部落-规则</title>
  <style>
    body {
      position: absolute;
      margin: 0;
      padding: 0;
      width: 1280px;
      height: 720px;
      background: url(images/class-bg.jpg);
      background-color: transparent;
    }

    img {
      position: absolute;
      top: 85px;
    }
  </style>
</head>

<body onload="init()" onunload="exit()">
  <img class="img" src="images/rules-img-1.png" alt="">
</body>
<script src="js/jquery.js"></script>
<script src="config/index.js?v=1"></script>
<script src="api/index.js?v=1"></script>
<script src="js/KeyEvent.js?v=12"></script>
<script src="js/event.js?v=12"></script>
<script src="js/utli.js?v=12"></script>
<script src="js/base.js"></script>

<script>
  var area = [];

  // 页面初始化
  function init() {
    // getPreFocus();
  }

  // 获取url参数
  function getPreFocus() {
    var url = window.location.href;
    focusArea = parseInt(GY.getURLParameter("AREA", url) != "" ? GY.getURLParameter(
      "AREA", url) : 0);
    area[focusArea].index = parseInt(GY.getURLParameter("INDEX", url) != "" ? GY.getURLParameter(
      "INDEX", url) : 0);
  }

  // 上键操作
  function keyUp() {
    var index = area[focusArea].index;
    freeFocus();
    switch (focusArea) {}
    onFocus()
  }

  // 下键操作
  function keyDown() {
    var index = area[focusArea].index;
    freeFocus();
    switch (focusArea) {}
    onFocus()
  }

  // 左键操作
  function keyLeft() {
    var index = area[focusArea].index;
    freeFocus();
    switch (focusArea) {}
    onFocus()
  }

  // 右键操作
  function keyRight() {
    var index = area[focusArea].index;
    freeFocus();
    switch (focusArea) {}
    onFocus()
  }

  // 回车键操作
  function keyEnter() {
    var index = area[focusArea].index;
  }

  // 返回键操作
  function keyBack() {
    isNeed = 0;
    GY.goback();
  }

  // 页面退出
  function exit() {

  }

  // 落焦
  function onFocus() {
    var eFocus = $('#' + area[focusArea].id + area[focusArea].index);
    eFocus.addClass('focus');
  }

  // 失焦 
  function freeFocus() {
    var eFocus = $('#' + area[focusArea].id + area[focusArea].index);
    eFocus.removeClass('focus');
  }
</script>

</html>